package com.cn.validator;

import com.jfinal.core.Controller;
import com.jfinal.render.Render;
import com.jfinal.validate.Validator;

public class ShowGoodsValidator extends Validator {


	@Override
	protected void validate(Controller c) {
		String username = c.getSessionAttr("user");
//		System.out.println(username);
		if(username==null){
			addError("message", "您还没有登录！");
		}
	}

	@Override
	protected void handleError(Controller c) {
		c.render("shopCart.jsp");
	}

}
